using UnityEngine;

public class RandomSkin : MonoBehaviour
{
	public static string keyRandomSkin = "keysRandomSkin";

	private void Start()
	{
		if (settings.tekNomSkin == 0 && !BCWStorage.Get<bool>(keyRandomSkin))
		{
			GiveRandomSkin();
		}
	}

	public void GiveRandomSkin()
	{
		Product randomSkinCanGiveRandom = MarketController.Instance.GetRandomSkinCanGiveRandom();
		if (randomSkinCanGiveRandom != null)
		{
			MarketController.Instance.BuyProduct(randomSkinCanGiveRandom, true);
			MarketController.Instance.Equip(randomSkinCanGiveRandom);
		}
		BCWStorage.Set(keyRandomSkin, true);
	}
}
